package gitee

import "time"

type MileStone struct {
	URL          string    `json:"url"`
	HtmlUrl      string    `json:"html_url"`
	ID           int64     `json:"id"`
	Number       int64     `json:"number"`
	RepositoryID int64     `json:"repository_id"`
	State        string    `json:"state"`
	Title        string    `json:"title"`
	Description  string    `json:"description"`
	UpdatedAt    time.Time `json:"updated_at"`
	CreatedAt    time.Time `json:"created_at"`
	OpenIssues   int64     `json:"open_issues"`
	ClosedIssues int64     `json:"closed_issues"`
	DueOn        string    `json:"due_on"`
}

type V8MileStoneList struct {
	TotalCount int64         `json:"total_count"`
	Data       []V8MileStone `json:"data"`
}

type V8Assignee struct {
	ID                 int64  `json:"id"`
	Username           string `json:"username"`
	Name               string `json:"name"`
	Remark             string `json:"remark"`
	Pinyin             string `json:"pinyin"`
	AvatarURL          string `json:"avatar_url"`
	IsEnterpriseMember bool   `json:"is_enterprise_member"`
	IsHistoryMember    bool   `json:"is_history_member"`
	Outsourced         bool   `json:"outsourced"`
}

type V8Author struct {
	ID                 int64  `json:"id"`
	Username           string `json:"username"`
	Name               string `json:"name"`
	Remark             string `json:"remark"`
	Pinyin             string `json:"pinyin"`
	AvatarURL          string `json:"avatar_url"`
	IsEnterpriseMember bool   `json:"is_enterprise_member"`
	IsHistoryMember    bool   `json:"is_history_member"`
	Outsourced         bool   `json:"outsourced"`
}

type V8Projects struct {
	ID                  int64       `json:"id"`
	Name                string      `json:"name"`
	Path                string      `json:"path"`
	Public              int64       `json:"public"`
	EnterpriseID        int64       `json:"enterprise_id"`
	CreatedAt           time.Time   `json:"created_at"`
	UpdatedAt           time.Time   `json:"updated_at"`
	SecurityHoleEnabled bool        `json:"security_hole_enabled"`
	Namespace           V8Namespace `json:"namespace"`
	Creator             V8Creator   `json:"creator"`
	PathWithNamespace   string      `json:"path_with_namespace"`
	NameWithNamespace   string      `json:"name_with_namespace"`
	ScanCheckRun        bool        `json:"scan_check_run"`
}

type V8MileStone struct {
	ID                 int64        `json:"id"`
	Title              string       `json:"title"`
	State              string       `json:"state"`
	StartDate          string       `json:"start_date"`
	DueDate            string       `json:"due_date"`
	CreatedAt          time.Time    `json:"created_at"`
	UpdatedAt          time.Time    `json:"updated_at"`
	ProgramID          int64        `json:"program_id"`
	Description        string       `json:"description"`
	DescriptionHTML    string       `json:"description_html"`
	Assignee           V8Assignee   `json:"assignee"`
	Author             V8Author     `json:"author"`
	IssueAllCount      int64        `json:"issue_all_count"`
	IssueCompleteCount int64        `json:"issue_complete_count"`
	PrAllCount         int64        `json:"pr_all_count"`
	PrCompleteCount    int64        `json:"pr_complete_count"`
	Projects           []V8Projects `json:"projects"`
	Program            interface{}  `json:"program"`
	Top                bool         `json:"top"`
}
